home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / pp / pp-6.0 / Lib / qmgr / qmgr.ry < prev    next >
Encoding:
Text File  |  1991-12-18  |  12.1 KB  |  577 lines

  1. -- qmgr.ry - Qmgr operation definitions
  2.  
  3.  
  4. -- @(#) $Header: /xtel/pp/pp-beta/Lib/qmgr/RCS/qmgr.ry,v 6.0 1991/12/18 20:23:58 jpo Rel $
  5. --
  6. -- $Log: qmgr.ry,v $
  7. -- Revision 6.0  1991/12/18  20:23:58  jpo
  8. -- Release 6.0
  9. --
  10. --
  11. --
  12.  
  13.  
  14. Qmgr 
  15. DEFINITIONS ::=
  16. BEGIN
  17.  
  18. -- EXPORTS everything
  19.  
  20.  
  21. -- PORTS
  22. qmgr-use OBJECT
  23.         PORTS { newmessage[S],
  24.         readmsginfo[S],
  25.         msginfo[C],
  26.         channelinitialise[C],
  27.         processmessage,
  28.         channelbegin[S],
  29.         readqueue[C],
  30.                 channelread[S],
  31.         channelinfo[C],
  32.         channelcontrol[S],
  33.         mtaread[S],
  34.         mtainfo[C],
  35.         mtacontrol[S],
  36.         qmgrstatus[S],
  37.         readchannelmtamessage[S] } ::= id-pt-qmgr-use
  38.  
  39.  
  40. activeChannel OBJECT
  41.             PORTS { channelinitialise, 
  42.             processmessage [S] }
  43.     ::= id-pt-activeChannel
  44.  
  45. passiveChannel OBJECT
  46.             PORTS { processmessage[S],
  47.                     channelbegin[C] }
  48.     ::= id-pt-passiveChannel
  49.  
  50. submitProcess OBJECT
  51.         PORTS { newmessage[C] }
  52.     ::= id-pt-submitProcess
  53.  
  54. queueReadProcess OBJECT 
  55.         PORTS { readqueue[S] }
  56.     ::= id-pt-queueReadProcess
  57.  
  58. managementUA OBJECT 
  59.             PORTS { processmessage[C],
  60.                     readmsginfo[C],
  61.             msginfo[S],
  62.                     channelread[C],
  63.             channelinfo[S],
  64.             channelcontrol[C],
  65.                     mtaread[C],
  66.             mtainfo[S],
  67.                     mtacontrol[C],
  68.             qmgrstatus[C],
  69.             readchannelmtamessage[C] }
  70.     ::= id-pt-managementUA
  71.  
  72. -- OPERATIONS
  73.  
  74.                 -- new message arrived
  75.                 -- Submit -> QMGR
  76. newmessage OPERATION
  77.     ARGUMENT MsgStruct
  78.     RESULT NULL
  79.     ERRORS { congested, protocol }
  80.     ::= 0
  81.  
  82.                 -- read a message
  83.                 -- Console -> QMGR
  84.                 -- QMGR -> QMGR
  85. readmsginfo OPERATION
  86.     ARGUMENT ReadMessageArgument
  87.     RESULT MsgList
  88.     ERRORS { congested, protocol }
  89.     LINKED {msginfo}
  90.     ::= 1
  91.  
  92.                 -- QMGR -> Console
  93.                 -- Incremental update
  94. msginfo OPERATION
  95.     ARGUMENT MsgList
  96.     ::= 10
  97.  
  98.                 -- processes a message
  99.                 -- QMGR -> Channel
  100. processmessage OPERATION
  101.     ARGUMENT ProcMsg
  102.     RESULT DeliveryStatus
  103.     ERRORS { congested, protocol }
  104.     ::= 2
  105.  
  106.                 -- start up a channel
  107.                 -- Channel -> QMGR
  108. channelbegin OPERATION
  109.     ARGUMENT FilterList
  110.             -- type of message requested
  111.     RESULT FilterList
  112.             -- what you are going to get
  113.     ERRORS { congested, protocol }
  114.     ::= 3
  115.  
  116.                 -- read the entire queue
  117.                 -- QMGR -> Q reader
  118. readqueue OPERATION
  119.     ARGUMENT NULL
  120.     RESULT MsgList
  121.     ERRORS { congested, protocol }
  122.     ::= 4
  123.  
  124.                 -- read a channel
  125.                 -- Console -> QMGR
  126.                 -- get info at channel level
  127. channelread OPERATION
  128.     ARGUMENT UTCTime
  129.     RESULT ChannelReadResult
  130.     ERRORS { congested, protocol }
  131.     LINKED {chaninfo}
  132.     ::= 5
  133.  
  134.                 -- QMGR -> Console
  135.                 -- Incremental update
  136. chaninfo OPERATION
  137.     ARGUMENT ChannelReadResult
  138.             -- info on ALL channels
  139.     ::= 11
  140.  
  141.                 -- control a channels behaviour
  142.                 -- Console -> QMGR
  143. channelcontrol OPERATION
  144.     ARGUMENT ChannelControl
  145.     RESULT PrioritisedChannelList
  146.     ERRORS { congested, protocol, noSuchChannel, illegalOperation,
  147.         authenticationFailure}
  148.     ::= 6
  149.  
  150.                 -- read about a mta
  151.                 -- Console -> QMGR
  152. mtaread OPERATION
  153.     ARGUMENT MtaRead
  154.     RESULT PrioritisedMtaList
  155.     ERRORS { congested, protocol, noSuchChannel }
  156.     LINKED {mtainfo}
  157.     ::= 7
  158.  
  159.                 -- QMGR -> Console
  160.                 -- Incremental update
  161. mtainfo OPERATION
  162.     ARGUMENT PrioritisedMtaList
  163.     ::= 12
  164.  
  165.                 -- control a mta
  166.                 -- Console -> QMGR
  167. mtacontrol OPERATION
  168.     ARGUMENT MtaControl
  169.     RESULT MtaInfo
  170.     ERRORS { congested, noSuchChannel, mtaNotInQueue,
  171.          authenticationFailure}
  172.     ::= 8
  173.  
  174.                 -- control a message
  175.                 -- Console -> QMGR
  176. msgcontrol OPERATION
  177.     ARGUMENT MsgControl
  178.     RESULT NULL
  179.     ERRORS { congested, protocol, noSuchChannel, mtaNotInQueue,
  180.          authenticationFailure}
  181.     ::= 13
  182.  
  183.                 -- QMGR -> Channel (process)
  184. channelInitialise OPERATION
  185.     ARGUMENT Channel
  186.     RESULT NULL
  187.     ERRORS { congested, protocol, noSuchChannel}
  188.     ::= 9
  189.  
  190. qmgrControl OPERATION
  191.     ARGUMENT QMGRControl
  192.     RESULT NULL -- always works
  193.     ERRORS { congested, protocol, authenticationFailure}
  194.     ::= 14
  195.  
  196. readChannelMtaMessage OPERATION
  197.     ARGUMENT MsgRead
  198.     RESULT MsgList
  199.     ERRORS { congested, protocol, noSuchChannel, mtaNotInQueue }
  200.     ::= 15
  201.  
  202. qmgrStatus OPERATION
  203.     ARGUMENT NULL
  204.     RESULT QmgrStatus
  205.     ERRORS { congested, protocol }
  206.     ::= 16
  207. -- ERRORS
  208.  
  209.             -- congestion at the responder
  210. congested ERROR
  211.     ::=        0
  212.  
  213.             -- unknown channel
  214. noSuchChannel ERROR
  215.     ::=        1
  216.  
  217.             -- unknown operation
  218. illegalOperation ERROR
  219.     ::=        2
  220.  
  221.             -- operation on mta makes no sense
  222. mtaNotInQueue ERROR
  223.     ::=        3
  224.  
  225.             -- error in the protocol
  226. protocol ERROR
  227.     ::=        4
  228.  
  229. authenticationFailure ERROR
  230.     ::=         5
  231.  
  232. -- Bind Arguments
  233.  
  234. BindArgument ::= CHOICE {    -- structure used in association request
  235.     noAuthentication [0] NULL,
  236.     weakAuthentication [1] WeakAuthentication
  237.     }
  238.  
  239. WeakAuthentication ::= SEQUENCE {
  240.     username [0] IA5String,
  241.     passwd   [1] IA5String OPTIONAL
  242.     }
  243.  
  244. BindResult ::= SEQUENCE {
  245.         result[0] ENUMERATED {    -- result from the association request
  246.             acceptedLimitedAccess(0), -- accepted limited access
  247.             acceptedFullAccess(1)      -- accepted full access
  248.         },
  249.         information[1] IA5String OPTIONAL,
  250.         version[2] IA5String OPTIONAL
  251.     }
  252.  
  253.  
  254. BindError ::= SEQUENCE {
  255.         reason[0] ENUMERATED {
  256.             badCredentials(0),    -- dont know this person
  257.             congested(1)        -- some system problem
  258.         },
  259.         information[1] IA5String OPTIONAL
  260.     }
  261.  
  262. -- DATA TYPES
  263.  
  264. Mta ::= IA5String
  265.  
  266. Channel ::= PrintableString
  267.  
  268. Priority ::= ENUMERATED {low(0), normal(1), high(2)}
  269.             -- Internal priorities COULD be different
  270.             -- to external ones
  271.  
  272. UAContentId ::= PrintableString
  273.  
  274. ContentType ::= PrintableString
  275.  
  276. EncodedInformationTypes ::= SEQUENCE OF PrintableString
  277.  
  278. QID ::= PrintableString
  279.  
  280. User ::= IA5String
  281.             -- QMGR just sees users as strings.
  282.             -- This is 822 or /= X.400 syntax
  283.             -- The caller must get the right form!
  284.             
  285.  
  286. ReadMessageArgument ::= SEQUENCE {
  287.         filters  FilterList,
  288.         interval UTCTime OPTIONAL
  289.             -- interval for control of the LINKED operation
  290.         }
  291.  
  292. MsgList    ::= SEQUENCE {
  293.         msgs SEQUENCE OF %[ type_Qmgr_MsgStructList %]
  294.             MsgStruct,
  295.         deleted SEQUENCE OF %[ type_Qmgr_QidList %] QID OPTIONAL
  296.         }
  297.  
  298. ProcMsg ::= SEQUENCE {
  299.     qid QID,
  300.     users UserList,
  301.             -- if USER 0, do all outstanding DNs
  302.     channel Channel  -- Channel to apply
  303.         -- must be same for each user!
  304.         -- Warning and Expiry channels have "special" behaviour
  305. }
  306.  
  307. Control ::= CHOICE {
  308.         stop [0] NULL,
  309.         start [1] NULL,
  310.         cacheClear [2] NULL,
  311.         cacheAdd [3] UTCTime }
  312.  
  313. ChannelControl ::=  SEQUENCE {
  314.         channel [0] Channel,
  315.         control [1] Control 
  316.         }
  317.  
  318. MtaControl ::= SEQUENCE {
  319.         channel [0] Channel,
  320.         mta [1] Mta,
  321.         control [2] Control 
  322.         }
  323.  
  324. MsgControl ::= SEQUENCE {
  325.         qid [0] QID,
  326.         users [1] UserList,
  327.         control [2] Control
  328.         }
  329.  
  330. UserList ::= SEQUENCE OF RecipientId
  331.  
  332. RecipientId ::= INTEGER
  333.  
  334. MsgStruct ::= SEQUENCE {
  335.     messageinfo    [0] PerMessageInfo,
  336.     recipientlist    [1] SEQUENCE OF %[ type_Qmgr_RecipientList %]
  337.                 RecipientInfo
  338.             -- only recipients with responsibility bit set
  339.             -- AND originator (recipient 0)
  340.             -- The originator is needed for DRs
  341.     }
  342.             
  343.  
  344. PerMessageInfo ::= SEQUENCE {
  345.     queueid        [0] QID,
  346.     mpduiden    [1] MPDUIdentifier,
  347.     originator    [2] User,
  348.     contenttype    [3] ContentType OPTIONAL,
  349.     eit        [4] EncodedInformationTypes OPTIONAL,
  350.     priority    [5] Priority,
  351.     size        [6] INTEGER,
  352.             -- size in bytes
  353.     age        [7] UTCTime,
  354.     warnInterval    [8] INTEGER,
  355.     numberWarningsSent [9] INTEGER,
  356.     expiryTime     [10] UTCTime,
  357.     deferredTime    [11] UTCTime OPTIONAL,
  358.     uaContentId    [12] UAContentId OPTIONAL,
  359.     errorCount    [13] INTEGER OPTIONAL,
  360.     inChannel    [14] Channel OPTIONAL
  361.     }
  362.  
  363. ProcStatus ::=     SEQUENCE {
  364.     enabled        [0] BOOLEAN,
  365.     lastAttempt    [1] UTCTime OPTIONAL,
  366.     cachedUntil    [2] UTCTime OPTIONAL,
  367.     lastSuccess    [3] UTCTime OPTIONAL
  368.     }
  369.  
  370. RecipientInfo ::= SEQUENCE {
  371.     user         [0] User,
  372.     id        [1] RecipientId,
  373.     mta        [2] Mta,
  374.     channelList    [3] SEQUENCE OF %[ type_Qmgr_ChannelList %] Channel,
  375.     channelsDone    [4] INTEGER,
  376.                 -- Number of channels processed
  377.                 -- If EQUAL to the number of channels, 
  378.                 -- this implies DN is still pending
  379.     procStatus     [4] ProcStatus OPTIONAL,
  380.     info        [5] IA5String OPTIONAL }
  381.  
  382.  
  383. FilterList ::= SEQUENCE OF Filter
  384.  
  385. Filter ::= SEQUENCE {
  386.     contenttype    [0] ContentType OPTIONAL,
  387.     eit        [1] EncodedInformationTypes OPTIONAL,
  388.             -- message must have only specified types
  389.     priority    [2] Priority OPTIONAL,
  390.             -- messages of this priority and above
  391.     moreRecentThan    [3] UTCTime OPTIONAL,
  392.     earlierThan    [4] UTCTime OPTIONAL,
  393.     maxSize        [5] INTEGER DEFAULT 0,
  394.             -- size in bytes
  395.     originator    [6] User OPTIONAL,
  396.     recipient    [7] User OPTIONAL,
  397.     channel        [8] Channel OPTIONAL,
  398.     mta        [9] Mta OPTIONAL,
  399.     queueid        [10] QID OPTIONAL,
  400.     mpduiden    [11] MPDUIdentifier OPTIONAL,
  401.     uaContentId    [12] UAContentId OPTIONAL }
  402.  
  403. ChannelReadResult ::= SEQUENCE {
  404.     channels    [0] PrioritisedChannelList,
  405.     load1        [1] INTEGER DEFAULT 0,
  406.     load2        [2] INTEGER DEFAULT 0,
  407.     currchans    [3] INTEGER DEFAULT 0,
  408.     maxchans    [4] INTEGER DEFAULT 0}
  409.  
  410. PrioritisedChannelList ::= SEQUENCE OF PrioritisedChannel
  411.  
  412. PrioritisedChannel ::= SEQUENCE {
  413.     channel    ChannelInfo,
  414.     priority Priority }
  415.  
  416. ChannelInfo ::= SEQUENCE {
  417.     channel        [0] Channel,
  418.     channelDescription [1] PrintableString,
  419.     oldestMessage    [2] UTCTime,
  420.     numberMessages    [3] INTEGER,    -- not including DRs
  421.     volumeMessages    [4] INTEGER,    -- bytes
  422.     numberActiveProcesses [5] INTEGER,
  423.     status        [6] ProcStatus,
  424.     numberReports   [7] INTEGER,
  425.     direction    [8] BITSTRING {
  426.         inbound (0),    -- supports inbound traffic
  427.         outbound (1)    -- supports outbound traffic
  428.                 -- both bits on => does both
  429.                 -- both bits off is internal
  430.         },
  431.     chantype    [9] ENUMERATED {
  432.         mta (0),    -- is an MTA level channel
  433.         mts (1),    -- is an MTS level channel
  434.         internal (2),    -- is an internal channel (formatter etc)
  435.         passive (3)    -- responding channel?
  436.         },
  437.     maxprocs    [10] INTEGER DEFAULT 0,
  438.     numberMtas    [11] INTEGER DEFAULT 0
  439.     
  440.     }
  441.  
  442. MtaRead ::= SEQUENCE {
  443.     channel Channel,
  444.     time UTCTime OPTIONAL
  445.     }
  446.  
  447. MsgRead ::= SEQUENCE {
  448.     channel Channel,
  449.     mta Mta,
  450.     time UTCTime OPTIONAL
  451.     }
  452.  
  453. PrioritisedMtaList ::= SEQUENCE OF PrioritisedMta
  454.  
  455. PrioritisedMta ::= SEQUENCE {
  456.     mta MtaInfo,
  457.     priority Priority }
  458.  
  459. MtaInfo ::= SEQUENCE {
  460.     channel        [0] Channel,
  461.     mta        [1] Mta,
  462.     oldestMessage    [2] UTCTime,
  463.     numberMessage    [3] INTEGER, -- not DRs
  464.     volumeMessages    [4] INTEGER,
  465.     status        [5] ProcStatus,
  466.     numberDRs    [6] INTEGER,
  467.     active        [7] BOOLEAN DEFAULT FALSE,
  468.     info        [8] IA5String OPTIONAL
  469.     }
  470.  
  471. DeliveryStatus ::= SEQUENCE OF IndividualDeliveryStatus
  472.  
  473.  
  474. IndividualDeliveryStatus ::=  SEQUENCE {
  475.     recipient [0] RecipientId,
  476.     status      [1] ENUMERATED {
  477.                   -- The QMGR should treat the following
  478.                   -- as successful.  In the latter cases
  479.                   -- a DR is processed in conjuction
  480.                   -- with a different recipient
  481.         success (0),
  482.         successSharedDR (1),
  483.         failureSharedDR (2),
  484.     
  485.                   -- The next set are treated by the
  486.                   -- QMGR as now having to send a DR
  487.         negativeDR (3),   -- negative DR
  488.         positiveDR (4),      -- positive DR
  489.                   
  490.  
  491.                   -- the final set are different types
  492.                   -- of transient failure, needing
  493.                   -- different QMGR retry strategies
  494.         messageFailure (5),-- temp failure on the Message (e.g. 
  495.                     -- protocol temp reject)
  496.         mtaFailure (6),      -- MTA failure (e.g. couldn't connect)
  497.         mtaAndMessageFailure (7)  -- Both (e.g. connection bust)
  498.         },
  499.     info[2] IA5String OPTIONAL
  500.     }
  501.  
  502.  
  503. QMGRControl ::= SEQUENCE {
  504.     op [0] QMGROp
  505.     }
  506.  
  507. QMGROp ::= ENUMERATED {
  508.     abort (0),    
  509.     gracefulTerminate (1),
  510.     restart (2),    -- as if from cold
  511.     rereadQueue (3),   -- but don't disguard curent information
  512.     disableSubmission (4),  -- Don't let processes submit
  513.     enableSubmission (5),
  514.     disableAll (6),
  515.     enableAll (7),
  516.     increasemaxchans(8),
  517.     decreasemaxchans(9) }
  518.     
  519.  
  520. QmgrStatus ::= SEQUENCE {
  521.     boottime     UTCTime,
  522.     messagesIn     INTEGER,
  523.     messagesOut     INTEGER,
  524.     addrIn        INTEGER,
  525.     addrOut        INTEGER,
  526.     opsPerSec     INTEGER,    -- * 100
  527.     runnableChans     INTEGER,    -- * 100
  528.     msgsInPerSec     INTEGER,    -- * 100
  529.     msgsOutPerSec     INTEGER,    -- * 100
  530.     maxChans     INTEGER,
  531.     currChans     INTEGER,
  532.     totalMsgs    INTEGER,
  533.     totalVolume    INTEGER,
  534.     totalDrs    INTEGER
  535.     }
  536.  
  537. -- P1 definitions included for ease
  538.  
  539.  
  540. MPDUIdentifier ::=
  541.     [APPLICATION 4] IMPLICIT SEQUENCE {
  542.         global    GlobalDomainIdentifier,
  543.         local    IA5String
  544.     }
  545. GlobalDomainIdentifier ::=
  546.     [APPLICATION 3]
  547.         IMPLICIT SEQUENCE {
  548.         country    CountryName,
  549.         admd AdministrationDomainName,
  550.         prmd PrivateDomainIdentifier OPTIONAL
  551.         }
  552.  
  553. CountryName ::=
  554.     [APPLICATION 1]
  555.         CHOICE {
  556.         numeric NumericString,
  557.         printable PrintableString
  558.         }
  559.  
  560. AdministrationDomainName ::=
  561.     [APPLICATION 2]
  562.         CHOICE {
  563.         numeric NumericString,
  564.         printable PrintableString
  565.         }
  566.  
  567. PrivateDomainIdentifier ::=
  568.     CHOICE {
  569.         numeric NumericString,
  570.  
  571.         printable PrintableString
  572.     }
  573.  
  574.  
  575.  
  576. END
  577.